<?php

namespace Dcat\Admin\ApiTester\Models;


use Illuminate\Database\Eloquent\Model;

class CgkjProj extends Model
{
	
    protected $table = 'cgkj_apitester_proj';
    protected $guarded = [];



    public function setCommonParamAttribute($extra)
    {
        $this->attributes['common_param'] = json_encode(array_values($extra));
    }

    public function setHeadParamAttribute($extra)
    {
        $this->attributes['head_param'] = json_encode(array_values($extra));
    }

    public function getCommonParamAttribute($extra)
    {
        return array_values(json_decode($extra, true) ?: []);
    }

    public function getHeadParamAttribute($extra)
    {
        return array_values(json_decode($extra, true) ?: []);
    }
    
}
